<?php
require "common.php";
require "templates/add.html";
if($_POST){
    $title=$_POST['title'];
    $content=$_POST['content'];
    $time=time();
    mysql_query("insert into `article` (`title`,`content`,`time`)values('$time','$content','$time')");
    echo "<script>alert('发布成功'),location.href='index.php'</script>";
}